package sessionTracking;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

public class SessionExample extends HttpServlet {
	public void doGet(HttpServletRequest

	req, HttpServletResponse res) throws ServletException, IOException {
		String st = req.getParameter("user");

		HttpSession ses = req.getSession();
		ses.setAttribute("uname", st);

		res.sendRedirect(res.encodeURL("/dn/printSessionAttribute"));
	}
}